﻿using DAL;
using MODEL;

namespace BLL
{
    public class DataService
    {

        private readonly BaseRepository<Account> _accountRepository;

        public DataService(BaseRepository<Account> accountRepository)
        {
            _accountRepository = accountRepository;
        }
        public List<Account> GetAccounts()
        {
            return _accountRepository.GetAll().ToList();
        }
        public int Delone(int Id)
        {
           var aa= _accountRepository.GetAll().FirstOrDefault(d=>d.AccountId==Id);
           return  _accountRepository.Del(aa);
            
        }
    }
}